#include "Operation_Rf2.h"


Operation_Rf2::Operation_Rf2(char ch, int nNum1, int nNum2) :
m_ch(ch), m_nNum1(nNum1), m_nNum2(nNum2)
{
	m_CharPFNMap['+'] = &Operation_Rf2::Add;
	m_CharPFNMap['-'] = &Operation_Rf2::Sub;
}

int Operation_Rf2::Add()
{
	return m_nNum1 + m_nNum2;
}

int Operation_Rf2::Sub()
{
	return m_nNum1 - m_nNum2;
}

int Operation_Rf2::Caculation()
{
	return (this->*m_CharPFNMap[m_ch])();
}

Operation_Rf2::~Operation_Rf2(void)
{
}
